package com.andorid.Download;
// chuong trinh minh hoa download file text, file ảnh , file mp3 
//trên host về lưu vào sdcard va hien dialog progress 

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class mainActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        Button btn_Image=(Button)findViewById(R.id.btn_Image);
        Button btn_File =(Button)findViewById(R.id.btn_Music);
        Button btn_Text= (Button)findViewById(R.id.btn_Text);
        btn_Image.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				
				startActivity(new Intent("android.intent.action.IMAGE"));
			}
		});
        btn_File.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				Intent i_file= new Intent("android.intent.action.mp3");
				startActivity(i_file);
			}
		});
        btn_Text.setOnClickListener(new View.OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub

				startActivity(new Intent("android.intent.action.TEXT"));
			}
		});
        
    }
}